package gui.JTextField;

import gui.Layouts.Aufgabe1;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.xml.bind.annotation.XmlElement.DEFAULT;

public class TxtField extends JFrame {

	
	static JTextField txtfield1;
	static JTextField txtfield2;
	
	public TxtField(){
		super("Textfeld");
		
		JLabel label1 = new JLabel("Eingabe:");
		txtfield1 = new JTextField("'eine Eingabe'");
		txtfield2 = new JTextField(8);	
		
		JPanel pane = new JPanel();
		getContentPane().add(pane);
		
		pane.add(label1);
		pane.add(txtfield1);
		pane.add(txtfield2);
		
		
		
		
		
		
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setLocationRelativeTo(null);
		setVisible(true);
		pack();
	}
	
	
	public static void main(String[] args) {
		
		JFrame frame = new TxtField();
			
		while(true){
			txtfield2.setText(txtfield1.getText());
						
		}
				
			
				

		
		
		
		
	}
	
	
}
